package com.ringtheweb.serviceprovider.jukebox.model;

import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;

import com.ringtheweb.model.Play;

@Entity
@Table(name="SONG_PLAY")
@DiscriminatorValue("SONG")
@PrimaryKeyJoinColumn(name = "SONG_ID",
                      referencedColumnName = "PLAY_ID")
public class SongPlay extends Play {

	/**
	 * serialVersionUID
	 */
	private static final long serialVersionUID = 1L;
	
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="ID")
	private Song song;

	public Song getSong() {
		return song;
	}

	public void setSong(Song song) {
		this.song = song;
	}

}
